package com.itheima.TestAnimal;

public abstract class Animal {
    private int age;
    private int numOfLegs;

    abstract void eat();

    public Animal() {
    }

    public Animal(int age, int numOfLegs) {
        this.age = age;
        this.numOfLegs = numOfLegs;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getNumOfLegs() {
        return numOfLegs;
    }

    public void setNumOfLegs(int numOfLegs) {
        this.numOfLegs = numOfLegs;
    }
}
